package main
{
	import flash.display.Stage;
	import flash.utils.getTimer;

	public class App
	{
		public function App()
		{
		}
		
		public static var appStage:Stage;
		
		
		private static var _stime:Number = 0;
		private static var _ctimer:Number = 0;
		/**
		 * 获取服务器当前时间(单位：秒)
		 */
		public static function get stime():Number
		{
			if(_stime == 0)
			{
				stime = Math.floor(new Date().getTime()/1000);
			}
			return _stime + Math.floor((getTimer() - _ctimer)/1000);
		}
		
		public static function set stime(value:Number):void
		{
			_stime = value;
			_ctimer = getTimer();
		}
	}
}